'use strict';

const conn = require('../../../libs/Conn');

module.exports = async function (params) {
    let updateObj;
    if(params.enable_char === '1'){
        updateObj = {
            user_name:params.user_name,
            group_id:params.group_id,
            enable:params.enable_char
        };
    }else{
        updateObj = {
            user_name:params.user_name,
            group_id:params.group_id,
            enable:params.enable_char
        };
    }
    let updateSql = `UPDATE user_file SET ? WHERE user_id IN (?) `;
    await conn(updateSql,[updateObj,params.user_id]);
    return {success: true};

};